Skip to content

fixing the input ui at certain endpoints causing the button to overflow. #1574

Merged
juliusmarminge merged 12 commits intopingdotgg:mainfrom
shivamhwp:input-ui-fix
Apr 1, 2026
Merged

fixing the input ui at certain endpoints causing the button to overflow. #1574
juliusmarminge merged 12 commits intopingdotgg:mainfrom
shivamhwp:input-ui-fix

Conversation

@shivamhwp
Copy link
Copy Markdown
Collaborator

@shivamhwp shivamhwp commented Mar 30, 2026

  • Move send, stop, and plan follow-up controls into a shared component
  • Add compact pending-question and implementation action variants to avoid overflow

origin - https://x.com/KevinVanCott/status/2038274360058753214

What Changed

  • Fixed a composer footer layout regression in plan-mode follow-up states after window resize.
  • Extracted the right-side composer action cluster into ComposerPrimaryActions so narrow-width behavior is explicit and testable.
  • Added compact fallbacks for overflow-prone actions:
    • Pending question flow now collapses Previous to an icon in compact mode.
    • Submit answers shortens to Submit in compact mode.
    • Plan follow-up compact mode now uses separate rounded action pills instead of the fused split Implement button.
  • Updated the footer action container to allow wrapping instead of forcing a non-shrinking row.
  • Added focused tests for compact pending-question and plan-follow-up action states.

Why

Resizing the app could leave the composer footer in a state where the right-side action cluster was wider than the available space. The old layout combined several constraints that made overflow inevitable:

  • the right-side action area was non-shrinking,
  • buttons were non-wrapping,
  • wide labels like Submit answers and the split Implement button had no narrow fallback,
  • the layout depended on a heuristic breakpoint rather than guaranteeing a valid layout at any width.

This change fixes the root cause instead of just adjusting the breakpoint. The footer actions now have a true compact rendering path, so they still fit when the composer becomes narrow after resize.

UI Changes

Before:

Screen.Recording.2026-03-30.at.3.16.26.PM.mov

After:

Screen.Recording.2026-03-30.at.3.41.59.PM.mov

note: don't mind the lag, it's just my machine having low memory !!

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
UI layout logic for the chat composer footer is now driven by DOM measurements and resize events, which could introduce edge-case regressions across browsers/viewports. Changes are isolated to the composer footer/action rendering and add targeted unit/browser tests to reduce risk.

Overview
Fixes chat composer footer action overflow after resizes by adding measurement-based compacting logic and separating footer compactness from primary-action compactness.

The right-side action cluster (send/stop, pending-question navigation, plan follow-up implement/refine) is extracted into a new ComposerPrimaryActions component with compact variants (shorter labels and icon-only previous). Footer layout helpers in composerFooterLayout.ts add overflow/fit calculations and update the wide-actions breakpoint, while browser tests in ChatView.browser.tsx simulate real container resizes to assert actions stay contained and the slash menu remains visible.

Written by Cursor Bugbot for commit 4381d82. This will update automatically on new commits. Configure here.

Note

Fix composer footer button overflow at narrow viewport widths

  • Replaces inline primary action rendering in ChatView.tsx with a new ComposerPrimaryActions component that supports a compact prop
  • Adds layout measurement logic using ResizeObserver and new helpers in composerFooterLayout.ts to independently compact either the full footer or only the primary actions based on measured overflow
  • Raises COMPOSER_FOOTER_WIDE_ACTIONS_COMPACT_BREAKPOINT_PX from 720px to 780px and introduces COMPOSER_PRIMARY_ACTIONS_COMPACT_BREAKPOINT_PX at the same threshold
  • In compact mode during pending questions, action labels shorten to 'Next'/'Submit'; the leading section gains horizontal scrolling
  • Adds browser tests asserting action buttons remain visually contained within the footer across resizes and viewport sizes

Macroscope summarized 9f17470.

- Move send, stop, and plan follow-up controls into a shared component
- Add compact pending-question and implementation action variants to avoid overflow
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c13e9257-98b0-4863-97c7-b33a1c422dbf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 30, 2026
- Raise the wide-actions compact threshold
- Force compact mode when footer content no longer fits
- Keep composer actions on one line and add fit tests
@github-actions github-actions bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Mar 30, 2026
- measure footer content width after padding
- add overflow-based compactness heuristic
- update tests for footer layout behavior
- add browser tests for pending input and plan follow-up footers
- mark composer footer/action compact state for layout assertions
- remove redundant ComposerPrimaryActions snapshot tests
- Update the test description to reflect that minor overflow stays expanded when primary actions can compact
- Preserve the intended composer footer layout behavior
# Conflicts:
#	apps/web/src/components/ChatView.browser.tsx
- Remove composer overflow clipping so slash-command items can render and receive pointer events
- Add a browser test covering menu visibility and hit target above the composer
- Fuse implement actions into a single responsive control
- Preserve model picker alignment and add regression coverage
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

- Preserve compact composer behavior at narrower widths
- Tweak provider model picker spacing to avoid truncation
@juliusmarminge juliusmarminge merged commit 0bc94bc into pingdotgg:main Apr 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants